import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    redirect: 'home',
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('../views/SearchView.vue')
  },
  {
    path: '/searchbox',
    name: 'searchbox',
    component: () => import('../views/searchboxView.vue')
  },
  {
    path: '/center',
    name: 'center',
    component: () => import('../views/MyCenter.vue')
  },
  {
    path: '/classify',
    name: 'classify',
    component: () => import('../views/ClassifyView.vue')
  },
  {
    path: '/liber',
    name: 'liber',
    component: () => import('../views/LiberVIew.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/loginView.vue')
  },
  {
    path: '/vip',
    name: 'vip',
    component: () => import('../views/VipView.vue')
  },
  {
    path: '/shelf',
    name: 'shelf',
    component: () => import('../views/BookshelfView.vue')
  },

  {
    path: '/page',  //详情1
    name: 'page',
    component: () => import('../views/PageView.vue')
  },

  {
    path: '/setups',  //设置
    name: 'setups',
    component: () => import('../views/SetupView.vue')
  },

  {
    path: '/safe',  // 账号与安全
    name: 'safe',
    component: () => import('../views/SafeView.vue')
  },

  {
    path: '/tomato',  //关于
    name: 'tomato',
    component: () => import('../views/TomatoView.vue')
  },

  {
    path: '/phone',  //手机号
    name: 'phone',
    component: () => import('../views/PhoneView.vue')
  },

  {
    path: '/concern',  //关注
    name: 'concern',
    component: () => import('../views/ConcernView.vue')
  },

  {
    path: '/coment',  //评论详情
    name: 'coment',
    component: () => import('../views/ComentView.vue')
  },

  {
    path: '/pay',  //我的订单
    name: 'pay',
    component: () => import('../views/PayView.vue')
  },

  {
    path: '/say',  //发布评论
    name: 'say',
    component: () => import('../views/SayView.vue')
  },

  {
    path: '/hshop',  //商城
    name: 'hshop',
    component: () => import('../views/bookshopView.vue')
  },
  {
    path: '/ShoppingCart',//商城购物车
    name: 'ShoppingCart',
    component: () => import('../views/ShoppingCart.vue'),
  },
  {//评价页
    path: '/comment',
    name: 'comment',
    component: () => import('../views/commentView.vue'),
  },
  {//购物收货地址
    path: '/ShipAddress',
    name: 'ShipAddress',
    component: () => import('../views/ShipAddress.vue'),
  },
  {//购物新增地址
    path: '/AddAddress',
    name: 'AddAddress',
    component: () => import('../views/AddAddress.vue'),
  },
  {//订单
    path: '/shopOrder',
    name: 'shopOrder',
    component: () => import('../views/shopOrder.vue'),
  },
  {//商城详情页
    path: '/shopDetail',
    name: 'shopDetail',
    component: () => import('../views/shopDetail.vue')
  },
  {//购物确认订单
    path: '/ConfirmOrder',
    name: 'ConfirmOrder',
    component: () => import('../views/ConfirmOrder.vue'),
  },
  {
    path: '/moreComment',
    name: 'moreComment',
    component: () => import('../views/moreComment.vue'),
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
